/**
 * Copyright (c) 2012 Nokia Corporation.
 */

package com.nokia.example.productcatalog;

/**
 * A utility class for managing indexes associated to an item.
 */
public class ItemIndex {
	public static final int INVALID_INDEX = -1;
    private int groupIndex = INVALID_INDEX;
    private int listIndex = INVALID_INDEX;
    
    /**
     * Constructor.
     */
    public ItemIndex() {
    }
    
    /**
     * Constructor.
     * @param groupIndex
     * @param listIndex
     */
    public ItemIndex(final int groupIndex, final int listIndex) {
        this.groupIndex = groupIndex;
        this.listIndex = listIndex;
    }
    
    /** 
     * @param groupIndex The group index to set.
     */
    public void setGroupIndex(final int groupIndex) {
    	this.groupIndex = groupIndex;
    }
    
    /** 
     * @return The group index.
     */
    public final int groupIndex() {
    	return this.groupIndex;
    }
    
    /** 
     * @param listIndex The product list index to set.
     */
    public void setListIndex(final int listIndex) {
    	this.listIndex = listIndex;
    }
    /** 
     * @return The product list index.
     */
    public final int listIndex() {
    	return this.listIndex;
    }
}
